package ShapeFilter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class ComposeShapeShifter implements IShapeShifter{

	private List<IShapeShifter> composeShape;
	
	public ComposeShapeShifter(List<IShapeShifter> listaShapeShifter){
		
		this.composeShape = listaShapeShifter;
	}
	
	public ComposeShapeShifter(IShapeShifter shapeShifterA, IShapeShifter shapeShifterB){
		
		 this.composeShape = new ArrayList<IShapeShifter>();
		 this.composeShape.add(shapeShifterA);
		 this.composeShape.add(shapeShifterB);
	}
	
	@Override
	public IShapeShifter compose(IShapeShifter aIShapeShifter) {
		
		return new ComposeShapeShifter(this , aIShapeShifter);
	}

	@Override
	public int deepest() {
		
		List<Integer> listOfDeeps = new ArrayList<Integer>();
		
		for (IShapeShifter iterableShapeShifter : this.composeShape) {
		
			listOfDeeps.add(iterableShapeShifter.deepest());
		}
		
		return 1 + Collections.max(listOfDeeps);
	}

	@SuppressWarnings("unused")
	@Override
	public IShapeShifter flat() {
		List<IShapeShifter> listFlat = new ArrayList<IShapeShifter>();
		List<Integer> listValues = new ArrayList<Integer>();
		
		
		for (IShapeShifter iShapeShifter_Iterable : this.composeShape) {
			
			
		}
		
		
		
		for (IShapeShifter iShapeShifter_Iterable : this.composeShape) {
			
		}
		return null;
		
	}

	@Override
	public List<Integer> values() {
		
		return null;
	}

}
